package com.antler.smt.admin.controller;

import com.antler.smt.admin.annotation.OperateCut;
import com.antler.smt.request.admin.PeopleReq;
import com.antler.smt.request.admin.RecruitmentReq;
import com.antler.smt.response.base.Result;
import com.antler.smt.service.admin.RecruitmentManagementService;
import com.antler.smt.utils.FormatListUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 招聘管理
 *
 * @author zhangyi
 * @date 2018/9/28 10:34
 */
@RestController
@RequestMapping("/recruitmentManage")
@Api(description = "招聘管理")
public class RecruitmentManagementController {

    @Resource
    private RecruitmentManagementService recruitmentManagementService;

    /**
     * 招聘管理
     *
     * @param recruitmentReq
     * @return
     */
    @GetMapping("/searchPeople")
    @ApiOperation(value = "招聘管理",httpMethod = "GET")
    @OperateCut(content = "招聘管理")
    public Result searchRecruitment(RecruitmentReq recruitmentReq,String status){
        List<Integer> integerList =
                FormatListUtil.pareIntLists(status);
        recruitmentReq.setAuditStatus(integerList);
        return recruitmentManagementService.searchRecruitment(recruitmentReq);
    }
}
